Auto merge of #2818 - robinst:use-exec-for-cargo-run, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 20 Oct 2016 17:58:29 +0000 (10:58 -0700)
committerGitHub <noreply@github.com>
Thu, 20 Oct 2016 17:58:29 +0000 (10:58 -0700)
commit9a0801da0caa81653950baffabd8705d41d24d40
tree5c8aac981825415c6a85c313932b0ed53bee29c7
parent02fed69e71806989a96ae372f5d0f7cbb9528c37
parented5cea5f7383b720604141b7384ed6ef9390b088
Auto merge of #2818 - robinst:use-exec-for-cargo-run, r=alexcrichton

Use CommandExt::exec for `cargo run` on Unix (#2343)

Before, we would spawn a child process for the program. One of the
problems with that is when killing the cargo process, the program
continues running.

With this change, the cargo process is replaced by the program, and
killing it works.

Before (`cargo run` is the parent):

> 502  7615  7614   0  2:26PM ttys012    0:00.12 /Users/rstocker/.multirust/toolchains/stable-x86_64-apple-darwin/bin/cargo run
> 502  7620  7615   0  2:26PM ttys012    0:00.01 target/debug/program

After (the shell is the parent):

> 502 81649 81648   0  5:27PM ttys012    0:00.69 -zsh
> 502  7739 81649   0  2:26PM ttys012    0:01.27 target/debug/program